

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_niandaxue/config/font.dart';

class NothingListView extends StatefulWidget{
  @override
  State<StatefulWidget> createState() => new NothingListViewState();
}

class NothingListViewState extends State<NothingListView>{
  @override
  Widget build(BuildContext context) {
    return ListView(
      children: <Widget>[
        Column(
          children: <Widget>[
            Image.asset(
              'assets/images/nothing.png',
              fit: BoxFit.contain,
              width: MediaQuery.of(context).size.width / 2,
            ),
            new Text('暂无数据'),
          ],
        ),
      ],
    );
//    return Center(
//      child: Text('暂无数据',
//        style: KFont.courseTitleStyle,
//      ),
//    );
  }
}

class TapLineView extends StatefulWidget{
  final String message;
  TapLineView({Key key, this.message});

  @override
  State<StatefulWidget> createState() => new TapLineViewState(key: key,message: this.message);
}

class TapLineViewState extends State<TapLineView>{
  final String message;
  TapLineViewState({Key key, this.message});
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 30.0,
      padding: const EdgeInsets.only(left: 10.0),
      child: Row(
        children: <Widget>[
          Icon(
            Icons.book,
            size: 15.0,
          ),
          SizedBox(
            width: 5.0,
          ),
          Text(message,
            style: new TextStyle(
              color: Colors.green, //字体颜色
              fontSize: 14.0,
              height: 1.5,
              letterSpacing: 1.0, //字体间距
            ),
          ),
        ],
      ),
    );
  }
}